//
//  UIView+Layer.m
//  jingduoduo
//
//  Created by diaojz on 16/2/19.
//  Copyright © 2016年 totem. All rights reserved.
//

#import "UIView+Layer.h"

IB_DESIGNABLE

@implementation UIView (Layer)

@dynamic cornerRadius;
@dynamic borderWidth;
@dynamic borderColor;
@dynamic userEnabled;

- (void)setCornerRadius:(NSUInteger)cornerRadius
{
    self.layer.cornerRadius = cornerRadius;
    self.layer.masksToBounds = cornerRadius > 0;
}

- (void)setBorderWidth:(NSUInteger)borderWidth
{
    self.layer.borderWidth = borderWidth;
}

- (void)setBorderColor:(UIColor *)borderColor
{
    self.layer.borderColor = borderColor.CGColor;
}

-(void)setUserEnabled:(BOOL)userEnabled{
    self.userInteractionEnabled = userEnabled;
}

@end
